package com.tedu.api;

import java.util.Scanner;

public class 测试 {
    public static void main(String[] args) {
        String str = "Hello, World!";
        int fromIndex = 5;
        int index = str.indexOf('o', fromIndex);
        System.out.println("从位置 " + fromIndex + " 开始，字符 'o' 在字符串中的位置是：" + index);
    }


    public class SignFunction {
        public void main(String[] args) {
            Scanner scanner = new Scanner(System.in);
            int x = scanner.nextInt();
              if   (x<0) {
                System.out.println(-1);
            } else if (x==0) {
                System.out.println(0);
            } else if (x>0){
                System.out.println(1);
            }
            System.out.println("输入x："+scanner);
        }
    }

    }

